import { defineConfig } from "vite";
import uni from "@dcloudio/vite-plugin-uni";
// https://vitejs.dev/config/
export default defineConfig({
  plugins: [uni()],
  server:{
    proxy:{
      "/dev":{
        target:"https://testingmall.gree.com",
        changeOrigin:true,
        rewrite:(path)=>path.replace(/^\/dev/,"")
      },
      "/test":{
        target:"https://testingmall.gree.com",
        changeOrigin:true,
        rewrite:(path)=>path.replace(/^\/test/,"")
      },
      "/uat":{
        target:"https://testingmall.gree.com",
        changeOrigin:true,
        rewrite:(path)=>path.replace(/^\/uat/,"")
      },
      "/production":{
        target:"https://fmall.gree.com",
        changeOrigin:true,
        rewrite:(path)=>path.replace(/^\/production/,"")
      }
    }
  }
});
